package com.qf.recharge.consumer;

import com.qf.recharge.service.RechargeService;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author zdl
 * @date 2025/4/16
 */
@Component
@RocketMQMessageListener(topic = "ORDER_TOPIC1", consumerGroup = "CLOSE_ORDER_GROUP1")
public class CloseOrderConsumer implements RocketMQListener<String> {
    @Resource
    private RechargeService rechargeService;
    @Override
    public void onMessage(String s) {
        rechargeService.closeOrder(s);
    }
}
